-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[offboard control] allow for direct actuator control #22222
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I do like the change, I am a bit concerned in replacing an existing flag and reusing it for something else. Especially for something that is risky as actuator controls.
@Jaeyoung-Lim I see your point, any suggestion for having a "smoother" transition then? What about introducing |
I hate to suggest this, but changing |
On second thought, with the current naming proposal, using @dagar , any opinion on this? |
For me this is the default way to engage offboard mode, since it is the safest way to fall back into previous mode and bypass different phases of flight (e.g. spool up during takeoff) |
Mhhh, I see. |
@LShivaRudra Please do not highjack the topic of this PR. You can either post a new issue or post questions on discuss.px4.io |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/px4-maintainers-call-november-14-2023/35183/1 |
92bf63c
to
3cf48ff
Compare
@Jaeyoung-Lim new proposal @dagar, I agree with you that a proper separation between external inputs and internal ones should be enforced at topic-name-level to, among other things, increase safety. |
New thrust and torque control mode added which replaces the previous actuator mode, in this mode the rate controllers are disables, the control allocator is enabled and the used externally provices vehicle_thrust_setpoints and vehicle_torque_setpoints. New direct_actuator mode In direct_actuator mode the control allocator module does not publish actuator_motors and actuator_servos messages which must instead be provided extrernally by the user. Removed old direct mode. Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
actuator_motors and actuator_servos subscribers for offboard control Being subscribers, this does not increase the computational load over the uxrce_dds brigde Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
3cf48ff
to
bbb06df
Compare
This one is quite dangerous. If a mode doesn't have the allocation flag set then the drone directly crashes which it currently does in Orbit because the flag was probably forgotten to be added. Here's the fix: |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/problems-with-some-px4-ros-topics/35854/4 |
This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/drone-unstable-in-offboard-direct-motor-control/36383/6 |
EDITED on 2023/11/18
Solved Problem
actuator
flag of theoffboard_control_mode
was referring to thrust and torque control, requestingvehicle_thrust_setpoints
andvehicle_torque_setpoint
.Solution
actuator
flag of theoffboard_control_mode
is renamedthrust_and_torque
.actuator
direct_actuator
flag disables the control allocator module. The offboard controller has then to provideactuator_motors
andactuator_servos
messages.vehicle_thrust_setpoints
andvehicle_torque_setpoint
actuator_motors
andactuator_servos
actuator
flag is removed after considering the risks related to keeping it.Changelog Entry
For release notes: new feature: direct actuator control in offboard mode
Documentation: Need to clarify page https://docs.px4.io/main/en/flight_modes/offboard.html